package eatwatch;

import java.util.*;

public class Record
{
	// member variables
	Hashtable mValues = new Hashtable ();
	private int mId = -1;

	// public interface
	public Object GetField (String field)
	{
		return mValues.get(field);
	}

	public void	SetField (String field, Object value)
	{
		mValues.put (field, value);
	}

	public void SetId (int id)
	{
		mId = id;
	}

	public int GetId ()
	{
		return mId;
	}

	public Enumeration GetNames ()
	{
		return mValues.keys ();
	}

	public String toString ()
	{
		String result = "";
		for (Enumeration e = mValues.keys (); e.hasMoreElements ();) {
			String field = (String) e.nextElement ();
			result += field + " = " + mValues.get (field) + "\n";
		}
		return result;
	}
}